clc;clear;close all;
group = 1;
mask_filepath = '.\0.4+0.3.bmp';
T = 20;
Area = [2530, 2830, 3550, 3850];
fig_filepath = '.\64\Pic_';
I = readFigure(fig_filepath);
[I, MASK] = fun_mask(mask_filepath, I, Area, T);
%% Actan
for g = 1:group
    index = 6*(g-1);
    I_Actan = I(1+index:6+index,1);
    algorithmsName = '(Actan)';
    data_filepath = ['.\Data\Data (',int2str(g),')\Actan\'];
    filename = int2str(g);
    main_Actan(I_Actan, data_filepath, filename, Area);
end

%% AIA
for g = 1:group
    index = 6*(g-1);
    I_AIA = I(1+index:6+index,1);
    algorithmsName = '(AIA)';
    iters = 10;
    data_filepath = ['.\Data\Data (',int2str(g),')\AIA\'];
    filename = int2str(g);
    main_AIA(I_AIA, data_filepath, filename, algorithmsName, iters, Area);
end

%% TLS_AIA
for g = 1:group
    index = 6*(g-1);
    I_TLS_AIA  = I(1+index:6+index,1);
    algorithmsName = '(TLS_AIA)';
    iters = 10;
    data_filepath = ['.\Data\Data (',int2str(g),')\TLS_AIA\'];
    filename = int2str(g);
    main_TLS_AIA(I_TLS_AIA, data_filepath, filename, algorithmsName, iters, Area);
end

%% TLS_LRD
for g = 1:group
    index = 6*(g-1);
    I_TLS_LRD = I(1+index:6+index,1);
    algorithmsName = '(TLS_LRD)';
    iters = 10;
    data_filepath = ['.\Data\Data (',int2str(g),')\TLS_LRD\'];
    filename = int2str(g);
    main_TLS_LRD(I_TLS_LRD, data_filepath, filename, algorithmsName, iters, Area,MASK);
end